using MeetingManagement.Domain.Common;

namespace MeetingManagement.Domain.Repositories
{
    public interface IRepository<TEntity> where TEntity : IAggregateRoot, IEntity
    {
        TEntity Get(Guid id);
        Task<TEntity> GetAsync(Guid id);
        IQueryable<TEntity> Query();
        Task CreateAsync(TEntity aggregateRoot);
        Task CreateRangeAsync(params TEntity[] aggregateRoots);
        Task UpdateAsync(TEntity aggregateRoot);
        Task UpdateRangeAsync(params TEntity[] aggregateRoots);
        Task DeleteAsync(TEntity aggregateRoot);
    }
}
